<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<ul>
			<li>苹果</li>
			<li>香蕉</li>
			<li class="lizi">梨子</li>
			<li class="lizi">菠萝</li>
			<li>橘子</li>
		</ul>
		
		
		<ul>
			<li>土豆</li>
			<li>番茄</li>
			<li>菠菜</li>
			<li>红薯</li>
			<li>玉米</li>
		</ul>
		
		<script type="text/javascript">
			var ul=document.getElementsByTagName("ul")[0];
			var lizi=document.getElementsByClassName("lizi");
			console.log(lizi[0]);
			console.log(ul);
			lizi[0].style.border="1px solid #000";
			
			var lizi2=ul.getElementsByClassName("lizi")[1];
			console.log(lizi2);
			lizi2.style.background="red";
			
		</script>
	</body>
</html>
